﻿using SUNRPA.CONTROLS.IMPL.domain.attrubutes;
using SUNRPA.CONTROLS.IMPL.domain.flowRunningVar;
using SUNRPA.CONTROLS.IMPL.util;
using System.Collections.Concurrent;
/// <summary>
/// Excel有Office和Wps目前只支持Office后期加入Wps支持。
/// </summary>
namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    [VarFieldName("OutVarName")]
    public class UNZIPTargetNParam:BaseParam {
        //创建同名文件夹？
        private bool createDir;
        private string zipFilePath = "";
        private string unzipPassword = "";
        private string unzipDir = "";
        private string outVarName = "unzipPath";
        public bool CreateDir {
            get => createDir; 
            set { 
                createDir = value;
                NotifyPropertyChanged("CreateDir");
            }  
        }
        public string ZipFilePath {
            get => zipFilePath; 
            set { 
                zipFilePath = value;
                NotifyPropertyChanged("ZipFilePath");
            }  
        }
        public string UnzipPassword {
            get => unzipPassword; 
            set { 
                unzipPassword = value;
                NotifyPropertyChanged("UnzipPassword");
            }  
        }
        public string UnzipDir {
            get => unzipDir; 
            set { 
                unzipDir = value;
                NotifyPropertyChanged("UnzipDir");
            }
        } 
        public string OutVarName {
            get => outVarName; 
            set { 
                outVarName = value;
                NotifyPropertyChanged("OutVarName");
            }
        }

        public override void SetLatestVarName(ConcurrentDictionary<string, ConcurrentDictionary<string, RPAVariableDefineWrapper>> globleData) {
            this.outVarName = this.GetLatestName(this.outVarName, globleData);
        }
    }
}
